package com.neusoft.cebc.util;

public class ThisSystemException extends RuntimeException {

	private static final long serialVersionUID = 6647847259433624930L;

	public ThisSystemException(String message, Throwable cause) {
		super(message, cause);
	}

	public ThisSystemException(String message) {
		super(message);
	}

	public static void throwWithMessage(String message, Object... args) {

		for (int i = 0; i < args.length; i++) {
			message = message.replaceFirst("\\?", String.valueOf(args[0]));
		}
		throw new ThisSystemException(message);
	}
}
